package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.ui.HLUIControl;

public class HLClassUIControl extends HLLibClass {
    public HLClassUIControl(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLUIControl();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                ((HLUIControl) self).GetArea(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLUIControl) self).GetArea(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3)));
            }
            break;
        }
        case 1: {
            ((HLUIControl) self).SetPixelArea(args.GetInt(0), args.GetInt(1), args.GetInt(2), args.GetInt(3), args.GetInt(4), args.GetInt(5));
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                ((HLUIControl) self).GetID();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLUIControl) self).GetID());
            }
            break;
        }
        }
    }
}
